package com.service.impl;

import com.dao.UserDao;
import com.dao.imp.UserDaoimpl;
import com.entity.Admin;
import com.entity.Company;
import com.entity.User;
import com.service.LoginService;

public class LoginServiceImpl implements LoginService {
    private UserDao userDao = new UserDaoimpl();
    @Override
    public Admin selectAllAdmin(String name, String pwd) {
        return userDao.selectAllAdmin(name, pwd);
    }

    @Override
    public User selectAllUser(String name, String pwd) {
        return userDao.selectAllUser(name, pwd);
    }

    @Override
    public Company selectAllCompany(String name, String pwd) {
        return userDao.selectAllCompany(name, pwd);
    }


    @Override
    public int addUser(User user) {
        return userDao.addUser(user);
    }

    @Override
    public int addCompany(Company company) {
        return userDao.addCompany(company);
    }
}
